package com.neborosoft.FlyingDog.utilities;

/**
 * Created with IntelliJ IDEA.
 * User: CM
 * Date: 20.01.13
 * Time: 2:13
 * To change this template use File | Settings | File Templates.
 */
public class MutableValue<T> {
    public T value;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        MutableValue that = (MutableValue) o;

        if (value != null ? !value.equals(that.value) : that.value != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        return value != null ? value.hashCode() : 0;
    }

    public MutableValue() {

    }

    public MutableValue(T value) {
        this.value = value;
    }
}
